package mlz.c_genericity.d_wild;

import java.util.ArrayList;
import java.util.Collection;

public class Demo {
    public static void main(String[] args) {
        ArrayList<String> list  = new ArrayList<>();
        list.add("张三");
        list.add("李素");
        getElement(list);

        ArrayList<Integer> list2 = new ArrayList<>();
        getElement(list2);
    }


    public static void getElement(Collection<?> coll) {
        //?可以表示接受任意类型
        System.out.println(coll);
    }
}
